<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>ZCshop-orderprint</title>
<style>
	table.toptable { width: 90%;background-color: #ccc;margin: 0 auto; }
	table.toptable tr td { background-color: #fff;padding: 4px; }
	table.innertable { width: 100%; }
	table.innertable tr td { padding: 4px;border-right: 1px #ccc solid;border-bottom: 1px #ccc solid; }	
	table.innertable_two { width: 100%; }
	table.innertable_two tr td { padding: 4px;border-bottom: 1px #ccc solid; }
</style>
</head>
<body>
<table class="toptable" cellpadding="0" cellspacing="1">
	<?php foreach($this->orders_array as $order):?>
	<tr>
		<td width="30%" rowspan="<?=$rowspan?>">
			订单号：G<?=$order['orderid']?><br />
			下订时间：<?=date('Y-m-d H:i:s',$order['add_time'])?><br />
			付款时间：<?if($order['pay_time']!='0'):?><?=date('Y-m-d H:i:s',$order['pay_time'])?><?else:?>未付款<?endif;?><br />
			买 家：<?=$order['username']?><br />
			订单金额：$<?=$order['money']?>
		</td>
		<?php 
			$temp_order_products = unserialize($order['order_string']);
		?>
		<td width="70%" valign="top" style="padding: 0;">
			<table class="innertable" cellpadding="0" cellspacing="1">
				<?php foreach($temp_order_products as $p):?>
				<tr>
					<td width="50%">
						Products name: <?=$p['subject']?><br />
						Quantity：<?=$p['amounts']?><br />
						Unit Price：$<?=$this->numberFormat($p['net_price'],2)?><br />
						Total amount: $<?=$this->numberFormat($p['amounts']*$p['net_price'],2)?><br />
						Specifications：<?=$p['pattern_name']?><br />
						badge patch：<?=$p['buy_BadgePatch']?> <?=$p['select_badgepatch']?><br />
						Badge Patch for size:<?=$p['badgepatchforsize']?><br />
						<strong>Not Original number and name:</strong><br />
						Print number or not：<?=str_replace("|", "<br />", $p['buy_name_num'])?><br />
						The quantity to print：<?=$p['printAmounts']?><br />
						Memo：<?=$p['printMesg']?><br />
						<strong>Original number and name:</strong><br />
						Print number or not：<?=str_replace("|", "<br />", $p['buy_originalname_num'])?><br />
						The quantity to print：<?=$p['originalprintAmounts']?><br />
						Memo：<?=$p['originalprintMesg']?>
					</td>
					<td width="50%" valign="top" style="padding: 0;">
						<table class="innertable_two" cellpadding="0" cellspacing="1">
						<?php
							$pattern_size_match_s = array();
							$pattern_size_match_c = array();
							preg_match_all("/([a-zA-Z]+):(\d+),/", $p['buy_pattern_size'], $pattern_size_arr);
							$pattern_size_match_s = $pattern_size_arr[1];
							$pattern_size_match_c = $pattern_size_arr[2];
						?>
						<?php foreach($pattern_size_match_s as $k=>$ps):?>
						<tr>
							<td>
								Size：<?=$ps?>,Count：<?=$pattern_size_match_c[$k]?>&nbsp;&nbsp;
								price：$<?=$this->numberFormat($p['net_price']*$pattern_size_match_c[$k],2)?>
							</td>
						</tr>
						<?php endforeach;?>
						</table>
					</td>
				</tr>
				<?php unset($pattern_size_match_s,$pattern_size_match_c,$pattern_size_arr);endforeach;?>
			</table>
		</td>
		<?php unset($temp_order_products);?>
	</tr>
	<?php endforeach;?>
</table>
</body>
</html>